package com.inspur.demo.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName DemoSchedule
 * @Description TODO
 * @Company inspur
 * @Author Mark.Zhang
 * @Date 2019/5/17 9:59
 * @Version 1.0 
 */
@Component
public class DemoSchedule {
//    @Scheduled(cron = "* 1 * * * *")
//    public void printCurTime() {
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss.SSS");
//        System.out.println(sdf.format(new Date()));
//    }
//    @Scheduled(fixedRate = 10000)
//    public void printDate() {
//        System.out.println(new Date());
//    }
}
